import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';

@Entity('sys_dept')
export class SysDept {
  @PrimaryGeneratedColumn({ comment: '部门id' })
  dept_id: number;

  @Column({ comment: '父部门id', default: 0 })
  parent_id: number;

  @Column({ comment: '祖级列表', default: '' })
  ancestors: string;

  @Column({ comment: '部门名称', default: '' })
  dept_name: string;

  @Column({ comment: '显示顺序', default: 0 })
  order_num: number;

  @Column({ comment: '负责人' })
  leader: string;

  @Column({ comment: '联系电话' })
  phone: string;

  @Column({ comment: '邮箱' })
  email: string;

  @Column({ comment: '部门状态（0正常 1停用）', default: '0' })
  status: string;

  @Column({ comment: '删除标志（0代表存在 2代表删除）', default: '0' })
  del_flag: string;

  @Column({ comment: '创建者', default: '' })
  create_by: string;

  @Column({ comment: '创建时间', type: 'datetime' })
  create_time: Date;

  @Column({ comment: '更新者', default: '' })
  update_by: string;

  @Column({ comment: '更新时间', type: 'datetime' })
  update_time: Date;
}
